package unit9_9.pojo;

import java.io.*;

public class Io {
    public static void main(String[] args) throws IOException {
        byte bwrite[]={11,21,22,3,5,45,30};

        OutputStream os=new FileOutputStream("test.txt");
        OutputStreamWriter writer=new OutputStreamWriter(os,"utf-8");
        for (int i = 0; i < bwrite.length; i++) {
            os.write(bwrite);
        }
        os.close();
        writer.close();

//        InputStream is=new FileInputStream("test.txt");
//        int size=is.available();
//
//        for (int i = 0; i < size; i++) {
//            System.out.println((char)is.read()+"");
//        }
//        is.close();
    }
}
